package com.edu.edu.week_project01.activity.fragment;


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.edu.edu.week_project01.R;
import com.edu.edu.week_project01.activity.bean.FragmentBean;

import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

/**
 * A simple {@link Fragment} subclass.
 */
public class SecondFragment extends Fragment {


    private ListView mLv;

    public SecondFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_second, container, false);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
//        mLv = (ListView)view.findViewById(R.id.second_lv);
//        Bundle msg = getArguments();
//        if(msg != null){
//            String data = msg.getString("url");
//            Log.i("TAG",">>>>>>>>>>>>>>>>>>>fragnment" + data);
//        }
        //下载解析json
//        LoadParseJson();
    }
    @Subscribe(threadMode = ThreadMode.ASYNC)
    public void getString(FragmentBean url) {
        String string = url.getString();
        Log.i("TAG",">>>>>>>>>>>>>>>>>>>>>>fragment" +string );
    }
}
